package view
{
	import com.adobe.webapis.flickr.Photo;
	
	import spark.components.Image;

	[Bindable]
	public class ThumnailView extends Image
	{
		private static var SERVER_PREFIX:String = 'http://static.flickr.com/';
		private static var THUMBNAIL_SUFFIX:String = "_s.jpg";
		private static var LARGE_IMAGE_SUFFIX:String = "_z.jpg";
		private static var THUMBNAIL_SIZE:Number = 75;
		
		private var largeImageSrc:String;
		
		public function ThumnailView(photo:Photo)
		{
			this.source = SERVER_PREFIX +  + photo.server + '/' + photo.id + '_' + photo.secret + THUMBNAIL_SUFFIX;
			this.largeImageSrc = SERVER_PREFIX +  + photo.server + '/' + photo.id + '_' + photo.secret + LARGE_IMAGE_SUFFIX;
			this.width = 75;
			this.height = 75;
		}
		
		public function getLargeImageSrc():String
		{
			return this.largeImageSrc;
		}
	}
}